const Koa = require("koa");
const Config = require("./config/database");
const Mysql = require("./mysql/index");

const app = new Koa();

app.use(async (ctx) => {
  let data = await Mysql.query();
  ctx.body = {
    code: 1,
    data: data,
    mesg: "ok",
  };
});

app.listen(Config.port);

console.log(`listening on port ${Config.port}`);
